﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace Scheduling.Models
{
    /// <summary>
    /// Model of a room
    /// </summary>
    public class Room
    {
        /// <summary>
        /// Unique ID of each room e.g "21E404".
        /// </summary>
        public string ID { get; set; }

        /// <summary>
        /// Name of the room.
        /// </summary>
        [StringLength(50)]
        public string Name { get; set; }

        /// <summary>
        /// Capacity of a room specified in a number of seats or
        /// maximum aloud capacity in some other facilities such as labs or gyms.
        /// </summary>
        public int? Capacity { get; set; }

        /// <summary>
        /// General description of a room.
        /// </summary>
        [StringLength(50)]
        public string Description { get; set; }

        /// <summary>
        /// The properties of the room. 
        /// </summary>
        public List<RoomProperty> Properties { get; set; }

        /// <summary>
        /// Some comments
        /// </summary>
        public RoomType? Type { get; set; }

        public override string ToString()
        {
            return string.Format("{0} Capacity: {1}", ID, Capacity ?? -1);
        }
    }
}